#ifndef SINGLE_SLIDER_WIDGET
#define SINGLE_SLIDER_WIDGET


#include "WidgetWithMatrix.h"
#include "Matrix.h"
#include "ui_singleslider.h"

class MatrixStack;

class SingleSliderWidget : public WidgetWithMatrix
{
	Q_OBJECT

public:
	SingleSliderWidget(QWidget *parent, MatrixStack &mtxStack);
	~SingleSliderWidget();

	int getMatrixId() const { return m_mtxId; }

protected:

	void setSliderRange(int min, int max);
	void setCaption(const QString &caption);

	Matrix &matrix();

	void updateMatrixStack();

	virtual void valueChanged(int newValue) {}

private slots:

	void onTrackbarValueChanged(int value);
	void upButtonClicked();
	void downButtonClicked();

private:

	Ui::SingleSlider m_ss;

	int m_mtxId;

	MatrixStack &m_mtxStack;
};


#endif